php forum
php mysql forum
php mysql smarty
 
Topic Options
#313300 - 03/01/07 05:57 AM [7.1] Removing Breadcrumb Redundancy
Myke Offline
Power User

Registered: 09/06/99
Posts: 97
Loc: Sydney, Australia
When viewing a forum or sub-forum, it really bothered me to see the name of the forum I was in repeated twice in the breadcrumb - first as a link, second as plain text.

Instinctively, whenever I wanted to go up one level (the mouse-click equivalent of 'cd ..') I would always click on the second last segment in the breadcrumb, but when you had a breadcrumb that looked like:

site >> Forums >> Foo >> Foo

you'd wind up in the same forum again. This reeeeaallly annoyed me, so here's a little mod that removes the redundant forum name from the breadcrumb.

In libs/ubbthreads.inc.php, find:
Code:
if ($inputTitle) {
	$breadcrumb .= " » $inputTitle";
}

and change to:
Code:
if ($inputTitle != $forum_title) {
	$breadcrumb .= " » $inputTitle";
}


So now, when viewing a forum, you get:

site >> Forums >> Foo

and when viewing a thread, you get:

site >> Forums >> Foo >> Thread Title

as it should be!

Top
#313301 - 03/01/07 06:44 AM Re: [7.1] Removing Breadcrumb Redundancy [Re: Myke]
Gizmo Offline

Wizard

Registered: 01/10/00
Posts: 5354
Loc: Portland, OR, USA
I like it, great job; and I agree completely on seeing where this could be annoying lol
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#313304 - 03/01/07 08:22 AM Re: [7.1] Removing Breadcrumb Redundancy [Re: Gizmo]
Ian_W Offline

Veteran

Registered: 02/22/02
Posts: 2575
Loc: England
nice simple change - thanks smile
_________________________
Fans Focus - Focusing on Fans of Sport

(Okay - mainly football (the British variety wink at the moment - but expanding all the time....)

Top
#313306 - 03/01/07 10:05 AM Re: [7.1] Removing Breadcrumb Redundancy [Re: Ian_W]
Mark_S Offline
Power User

Registered: 11/15/03
Posts: 86
Loc: UK
Nice one,
I say youve just fixed a bug wink

Top
#313307 - 03/01/07 10:19 AM Re: [7.1] Removing Breadcrumb Redundancy [Re: Mark_S]
AllenAyres Offline

I type Like navaho

Registered: 03/10/00
Posts: 25580
Loc: Texas
Thank you smile
_________________________
- Allen wavey
- What Drives You?

Top
#313325 - 03/02/07 04:46 PM Re: [7.1] Removing Breadcrumb Redundancy [Re: AllenAyres]
Steve C Offline
Lurker

Registered: 02/21/07
Posts: 3
Loc: California
The above mod leaves the last unit on the Forum Summary as a redundant link to the current page.  So I changed the line before the above change by enclosing it within an if ... }

Original:
Code:
$breadcrumb .= " &raquo; <a href=....
  if ($inputTitle) {


Revised:
Code:
if ($inputTitle != $forum_title) {
  $breadcrumb .= " &raquo; <a href=....
}
      if ($inputTitle) {


So now, when viewing a forum summary, I get:
site >> Forums >> Cat >> ForumName

I don't think the change affects the breadcrumb text on the thread-view page.

Top
#313359 - 03/04/07 03:04 AM Re: [7.1] Removing Breadcrumb Redundancy [Re: Steve C]
Ian_W Offline

Veteran

Registered: 02/22/02
Posts: 2575
Loc: England
To be honest I prefer the link to the current forum - I can click on it to refresh the forum and see if there are any new posts smile
_________________________
Fans Focus - Focusing on Fans of Sport

(Okay - mainly football (the British variety wink at the moment - but expanding all the time....)

Top
#313367 - 03/04/07 03:30 PM Re: [7.1] Removing Breadcrumb Redundancy [Re: Ian_W]
Gizmo Offline

Wizard

Registered: 01/10/00
Posts: 5354
Loc: Portland, OR, USA
Originally Posted By: Ian_W
To be honest I prefer the link to the current forum - I can click on it to refresh the forum and see if there are any new posts smile
agreed
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#313413 - 03/06/07 01:13 AM Re: [7.1] Removing Breadcrumb Redundancy [Re: Gizmo]
Steve C Offline
Lurker

Registered: 02/21/07
Posts: 3
Loc: California
Hmmmm, curious and interesting... I've always used the browser's refresh button. Since most sites don't have any type of refresh-specific link, I have gotten quite used to using the browser's button.

Top
#313733 - 03/28/07 03:33 PM Re: [7.1] Removing Breadcrumb Redundancy [Re: Myke]
Rick Offline
Guru

Registered: 05/11/99
Posts: 8373
Loc: Olympia, WA
Thanks Myke. I'll be making this change for 7.1.1.
_________________________
UBB.threads Developer

Top



Moderator:  sirdude 
Latest Posts
[7.2.1] - Naked shoutbox
by bellaonline
05/05/12 05:00 PM
[7.x] Stop Forum Spam Integration v0.4
by bellaonline
05/05/12 03:53 PM
Shout Box

(Views)Popular Topics
Known public proxy servers 1689885
Integrated Index Page (IIP) 5.3.1 555705
Finished-[6.5.2] Games Arcade Deluxe v1.9 501236
Integrated Index Page (IIP) 5.1.1 415112
TLD Bv2.1 Released - Threads Links Directory 396822
[6.0x] Who's Online 4.0.0 [Finished] 389412
Finished-[6.5.1] Integrated Index Page (IIP) 6.5 330423
Q & A 298663
Slash UBB 266936
[6.3.x] [beta] Hit Hack 2.0 227970
Forum Stats
13621 Members
59 Forums
37191 Topics
295716 Posts

Max Online: 686 @ 06/28/07 07:04 AM

 

 

 
fusionbb message board php hacks